package com.chagee.store.operation.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @Author : yzq
 * @Date : 2024/7/2
 */

@AllArgsConstructor
@Getter
public enum LarkMessageTypeEnum {

	appealNotice("appealNotice", "打烊申诉",LarkMessageReceiveEnum.START_APPEAL.getType(),"请处理打烊申诉"),
	appealSuccessNotice("appealSuccessNotice", "打烊申诉成功",LarkMessageReceiveEnum.APPEAL_SUCCESS.getType(),"打烊任务项申诉审核通过"),
	taskAppealRejected("taskAppealRejected", "任务申诉驳回",LarkMessageReceiveEnum.APPEAL_SUCCESS.getType(),"打烊任务项申诉审核驳回"),

	expired_appeal("expired_appeal", "过期工单申诉成功",LarkMessageReceiveEnum.EXPIRED_APPEAL.getType(),"门店：{0}供应商发起打烊工单过期申诉"),
	handle_appeal("handle_appeal", "过期申诉成功",LarkMessageReceiveEnum.HANDLE_APPEAL.getType(), "门店：{0}工单过期申诉{1}"),
	orderTakingNotice("orderTakingNotice", "未接单门店通知",LarkMessageReceiveEnum.ORDER_TAKING_NOTICE.getType(), "夜洁工单未接单门店清单"),
	//连续三天打烊任务不合格申诉
	order_appeal("order_appeal", "连续三天打烊任务不合格申诉成功",LarkMessageReceiveEnum.EXPIRED_APPEAL.getType(),"门店：{0}供应商发起连续三天打烊任务不合格申诉"),
	handle_order_appeal("handle_order_appeal", "连续三天打烊任务不合格申诉成功",LarkMessageReceiveEnum.HANDLE_APPEAL.getType(), "门店：{0}工单连续三天打烊任务不合格申诉{1}"),

	orderAppealRejected("orderAppealRejected", "过期打烊工单申诉审核驳回", LarkMessageReceiveEnum.HANDLE_APPEAL.getType(), "打烊工单申诉审核驳回"),
	specialOrderAppealRejected("specialOrderAppealRejected", "连续三天打烊任务不合格申诉驳回", LarkMessageReceiveEnum.HANDLE_APPEAL.getType(), "门店：{0}连续三天打烊任务不合格申诉驳回"),

	//结算驳回
	storeRejected("storeRejected", "门店结算驳回通知",LarkMessageReceiveEnum.NIGHT_SWEEP.getType(), "夜洁结算单被驳回，请及时处理"),
	supplierRejected("supplierRejected", "供应商结算驳回通知",LarkMessageReceiveEnum.NIGHT_SWEEP.getType(), "夜洁结算单被驳回，请及时处理"),

	submitInvoice("submitInvoice", "供应商提交发票通知",LarkMessageReceiveEnum.SETTLEMENT_SUBMIT_INVOICE.getType(), "夜洁结算单供应商已提交发票，请及时查看"),
	settlementWaitPay("settlementWaitPay", "结算单待支付超时通知",LarkMessageReceiveEnum.SETTLEMENT_SUBMIT_INVOICE.getType(), "夜洁结算单待支付已超时，请及时处理"),

	;


	private final String type;
	private final String desc;
	private final String receive;
	private final String messageTitle;



	public static LarkMessageTypeEnum getByType(String type) {
		for (LarkMessageTypeEnum value : values()) {
			if (Objects.equals(type, value.getType())) {
				return value;
			}
		}
		return null;
	}
}
